package com.zy.scwwebuis.service;

import com.zy.scwcommon.bean.AppResponse;
import com.zy.scwwebuis.ScwWebuisApplication;
import com.zy.scwwebuis.service.exp.TProjectInfoServiceFeignExceptionHandler;
import com.zy.scwwebuis.vo.resp.ProjectDetailVo;
import com.zy.scwwebuis.vo.resp.ReturnPayConfirmVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
* @program: zyzc_springcloud
*
* @description: 调用项目服务
*
* @author: ZYY
*
* @create: 2024-07-08 15:30
**/
@Component
@FeignClient(value="SCW-PROJECT",fallback= TProjectInfoServiceFeignExceptionHandler.class)
public interface TProjectInfoServiceFeign {


    @PostMapping("/project/all")
    public AppResponse<List<ScwWebuisApplication.ProjectVo>> all();
/**
 * @Description:项目模块接口调用
 * @Param:
 * @return:
 * @Author: zy
 * @Date:
 */
    @GetMapping("/project/details/info/{projectId}")
    public AppResponse<ProjectDetailVo> detailsInfo(@PathVariable("projectId") Integer projectId);

    @ApiOperation(value="4.获取项目支持的接口--确认回报信息")
    @GetMapping("/project/sys/support/{projectId}/{returnId}")
    public AppResponse<ReturnPayConfirmVo> support(@PathVariable("projectId") Integer projectId,
                                                   @PathVariable("returnId") Integer returnId);
}
